'''
作者:安雨杰
介绍:首页模块每年系统用户活跃度统计接口测试
'''
import unittest

from utils.session import Session


# 每年的活跃度
class AnnualActivityTest(unittest.TestCase):
    '''
    作者:安雨杰
    介绍:每年系统用户活跃度统计接口测试类
    '''
    session = None
    header = None

    @classmethod
    def setUpClass(cls) -> None:
        cls.session = Session.get_session()
        cls.header = Session.get_header()

    @classmethod
    def tearDownClass(cls) -> None:
        cls.session.close()

    def test_yearly(self):
        url = "http://120.53.243.26:8009/api/userActivity/statistics/3"
        # 发送请求
        resp = self.session.get(url,headers=Session.get_header())
        # 打印状态码
        print(resp.status_code)
        # 断言状态码
        self.assertEqual(200, resp.status_code)

